home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d12
/
cbibcode.arc
/
SPRINTF.C
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1991-08-05
|
321 b
|
13 lines
/* sprintf.c --- p 467 */
#include <stdio.h>
int i = 100;
double x = 1.23456;
main()
{
int numout;
char outbuf[81];
numout = sprintf(outbuf, "The value of i = %d and the value "
"of x = %g\n", i, x);
printf("sprintf wrote %d characters and the buffer contains:\n%s",
numout, outbuf);
}